<?php 
class Curl{
	static public function curl_get($url) {
	    $ch = curl_init();
	    curl_setopt($ch, CURLOPT_URL,$url);
	    curl_setopt($ch, CURLOPT_HEADER, 0);
	    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	    $data = curl_exec($ch);
	    curl_close($ch);
	    if ($data) return $data;
	    else return false;
	}
	
	static public function curl_post($url, $vars) {       
	    $ch = curl_init();    
	    curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);      
	    curl_setopt($ch, CURLOPT_URL,$url);     
	    curl_setopt($ch, CURLOPT_POST, 1 );     
	    curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
	    //disable https check
	    curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
		curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
		//disable https check
	    $data = curl_exec($ch);
	    if ($data) {
	    	curl_close($ch);
	        return $data;     
	    } else {
	    	//echo 'Curl error: ' . curl_error($ch);
	    	curl_close($ch);
	        return false;
	    }
	}
}
?>